package com.collect.tanzania.zhiScene.zhiCollection.zhiMember.zhiPerformance.zhiSort;

import com.collect.tanzania.zhiBean.zhiReceive.ZHIRPerformanceDayDetailEntity;
import com.collect.tanzania.zhiUtils.ZHICalendarUtil;

import java.util.Comparator;

public class ZHIMemberPerformanceCompareByDateASC implements Comparator<ZHIRPerformanceDayDetailEntity> {
    @Override
    public int compare(ZHIRPerformanceDayDetailEntity o1, ZHIRPerformanceDayDetailEntity o2) {

        long o1DateL = ZHICalendarUtil.getTimeFromDateString(o1.getAssignDate()+" 00:00:00", null);
        long o2DateL = ZHICalendarUtil.getTimeFromDateString(o2.getAssignDate()+" 00:00:00", null);

        return Long.compare(o2DateL, o1DateL);
    }
}
